<?php if($r_guru->num_rows() > 0): ?>
<h4 class="widgettitle nomargin shadowed">Tambah Data Login User</h4>
<div class="widgetcontent bordered shadowed nopadding">
	<form class="stdform stdform2" method="POST" action="<?php echo base_url('admin/adm_login/simpan_data/tambah') ?>">
		<p>
			<label for="id_guru">Nama Pengajar</label>
			<span class="field">
                <select id="id_guru" name="id_guru" class="uniformselect">
                    <?php
                    foreach ($r_guru->result() as $v_guru)
                    {
                        echo '<option value="' . $v_guru->id . '" >' . $v_guru->nama_guru . '</option>';
                    }
                    ?>
                </select>
			</span>
		</p>
		<p>
			<label for="username">Username</label>
			<span class="field">
                <input id="username" type="text" name="username" required maxlength="20" class="input-medium" />
			</span>
		</p>
		<p>
			<label for="password">Password</label>
			<span class="field">
                <input id="password" type="password" name="password" required maxlength="50" class="input-large" />
			</span>
		</p>
		
        <p class="stdformbutton">
            <button class="btn btn-primary">Tambah Data Login User</button>
            <button type="reset" class="btn">Reset</button>
        </p>
	</form>
</div>
<?php 
else :
	echo '<center>-Semua guru sudah memiliki data login user-</center>';
endif;
?>
<br/>
<h4 class="widgettitle nomargin shadowed">Data Login User</h4>
<table class="table table-bordered" id="dyntable">
    <colgroup>
        <col class="con1" />
        <col class="con0" />
        <col class="con1" />
        <col class="con0" />
        <col class="con1" />
        <col class="con0" />
    </colgroup>
    <thead>
        <tr>
            <th width="8%" class="head0">Nomor</th>
            <th class="head1">Login Username</th>
            <th class="head0">Nama Pengajar</th>
            <th class="head0">Option</th>
        </tr>
    </thead>
    <tbody>
        <?php
        $nomor = 0;
        foreach ($rslt_data_login->result() as $value_data_kelas)
        {
            $nomor++;
            echo '<tr>';
            echo '<td style="text-align:right">' . $nomor . '</td>';
            echo '<td>' . $value_data_kelas->username . '</td>';
            echo '<td>' . $value_data_kelas->nama_guru . '</td>';
            echo '<td><center>
			<a href="' . base_url('admin/adm_login/edit/' . $value_data_kelas->id) . '" title="ubah"><i class="iconsweets-create"></i></a> | 
                    <a href="' . base_url('admin/adm_login/hapus/' . $value_data_kelas->id) . '" title="hapus"><i class="iconsweets-trashcan"></i></a>
					</center></td>';
            echo '</tr>';
        }
        ?>
    </tbody>
</table>